package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;


/**
 * 兑换码
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_card_plan_redeem_code")
public class CardPlanRedeemCode extends Model<CardPlanRedeemCode> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "redeem_code", type = IdType.ASSIGN_ID)
    private String redeemCode;
    /**
     * 计划ID
     */
    @TableField("plan_id")
    private String planId;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;

    public void freeData() {
        this.redeemCode = null;
        this.planId = null;
        this.userId = null;
    }

}
